package com.ikas.autumn.iec104.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 遥测遥信枚举
 * @author wu.yunfeng
 */
@Getter
@AllArgsConstructor
public enum AttrCategoryEnum {
    /**
     *
     */
    TECH(1,"技术参数"),
    YC(2,"遥测"),
    YX(3,"遥信");

    private int code;
    private String name;

    public static String getCategory(int code){
        for (AttrCategoryEnum cateEnum : AttrCategoryEnum.values()) {
            if (code == cateEnum.code) {
                return cateEnum.getName();
            }
        }
        return null;
    }

}
